package com.passengerflowmanagementsystem.statistics.service.impl;

import java.util.List;
import com.passengerflowmanagementsystem.common.utils.DateUtils;
import com.passengerflowmanagementsystem.statistics.domain.EmExhibitionShop;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.passengerflowmanagementsystem.statistics.mapper.EmExhibitionShopMapper;
import com.passengerflowmanagementsystem.statistics.service.IEmExhibitionShopService;

/**
 * 展馆Service业务层处理
 * 
 * @author sheng
 * @date 2024-10-28
 */
@Service
public class EmExhibitionShopServiceImpl implements IEmExhibitionShopService 
{
    @Autowired
    private EmExhibitionShopMapper emExhibitionShopMapper;

    /**
     * 查询展馆
     * 
     * @param shopId 展馆主键
     * @return 展馆
     */
    @Override
    public EmExhibitionShop selectEmExhibitionShopByShopId(Long shopId)
    {
        return emExhibitionShopMapper.selectEmExhibitionShopByShopId(shopId);
    }

    /**
     * 查询展馆列表
     * 
     * @param emExhibitionShop 展馆
     * @return 展馆
     */
    @Override
    public List<EmExhibitionShop> selectEmExhibitionShopList(EmExhibitionShop emExhibitionShop)
    {
        return emExhibitionShopMapper.selectEmExhibitionShopList(emExhibitionShop);
    }

    /**
     * 新增展馆
     * 
     * @param emExhibitionShop 展馆
     * @return 结果
     */
    @Override
    public int insertEmExhibitionShop(EmExhibitionShop emExhibitionShop)
    {
        emExhibitionShop.setCreateTime(DateUtils.getNowDate());
        return emExhibitionShopMapper.insertEmExhibitionShop(emExhibitionShop);
    }

    /**
     * 修改展馆
     * 
     * @param emExhibitionShop 展馆
     * @return 结果
     */
    @Override
    public int updateEmExhibitionShop(EmExhibitionShop emExhibitionShop)
    {
        emExhibitionShop.setUpdateTime(DateUtils.getNowDate());
        return emExhibitionShopMapper.updateEmExhibitionShop(emExhibitionShop);
    }

    /**
     * 批量删除展馆
     * 
     * @param shopIds 需要删除的展馆主键
     * @return 结果
     */
    @Override
    public int deleteEmExhibitionShopByShopIds(Long[] shopIds)
    {
        return emExhibitionShopMapper.deleteEmExhibitionShopByShopIds(shopIds);
    }

    /**
     * 删除展馆信息
     * 
     * @param shopId 展馆主键
     * @return 结果
     */
    @Override
    public int deleteEmExhibitionShopByShopId(Long shopId)
    {
        return emExhibitionShopMapper.deleteEmExhibitionShopByShopId(shopId);
    }
}
